import password from "../../wxjs/password";
const app = getApp();

var properties = {
  payModel: {
    type: Boolean,
    value: false,
  },
  price: {
    type: Number,
    value: 0,
  },
  title: {
    type: String,
    value: '',
  },
};



var currentMethods = {
  close,
  closeModel,
  doneInputPassword,//6位密码输入完毕
};


Component({
  properties,
  ready,
  methods: Object.assign({}, password, currentMethods)
});

function ready() {
  const that = this;
  that.getPasswords();
}

function close(){
  const that = this;
  that.closeModel();
  that.triggerEvent('closePay');
}

function closeModel(){
  const that = this;
  that.setData({
    payModel: false
  })
}

function doneInputPassword(password){
  const that = this;
  that.closeModel();
  that.triggerEvent('doneInputPassword', password);
}